<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/5/22 0022
 * Time: 下午 5:51
 */

use Illuminate\Http\Request;

Route::get('/test', function () {
    echo '403';
});


//Route::group(['middleware' => ['web'],'prefix' => 'admin','namespace' => 'Admin'], function () {
//
//    Route::get('/login','LoginController@index');
//
//});

Route::group(['middleware' => ['auth'],'prefix' => 'admin','namespace' => 'Admin'], function () {

    Route::get('/',['as'=>'admin' , 'uses' => 'IndexController@index']);

    Route::resource('adminUsers','AdminUsersController',['except'=>['show']]); //后台用户管理

    Route::resource('category','CategoryController',['except'=>['show']]); //分类管理

    Route::resource('article','ArticleController'); //文章管理
    Route::post('upload',['as' => 'upload.server' , 'uses' => 'ArticleController@uploadServer']);//编辑器上传图片

    Route::resource('goods','GoodsController'); //商品管理
    Route::get('createExcel',['as' => 'goods.excel.create' , 'uses' => 'GoodsController@createExcel']);//Excel上传商品页面
    Route::post('storeExcel',['as' => 'goods.excel.store' , 'uses' => 'GoodsController@storeExcel']);//Excel上传商品
});
